<?php
/**
 * 检查报告结果
 * Created by PhpStorm.
 * User: zhang-hong
 * Date: 2017/3/8
 * Time: 15:28
 */
class GetjiancharesultController extends Yaf_Controller_Abstract
{
    function IndexAction()
    {
        $request = $this->getRequest();
        $jiancha_id = $request->getPost("jiancha_id",0);
        $yiyuan_id = $request->getPost("yiyuan_id",0);
        //$jiancha_id = strip_tags($_REQUEST['jiancha_id']);
        //$yiyuan_id = strip_tags($_REQUEST['yiyuan_id']);
        $zhuyuanfarelevelModel = new ZhuyuanFareLevelModel();
        if(!ctype_digit("$yiyuan_id"))
        {
            Utility::apiJsonError(20027, '医院ID必须是整型');
        }
        if(!ctype_digit("$jiancha_id"))
        {
            Utility::apiJsonError(20016, '检查ID必须是整型');
        }
        $pacs_jiancha_result = $zhuyuanfarelevelModel->getPascJiancha($jiancha_id,$yiyuan_id);

        if(!empty($pacs_jiancha_result))
        {
            $data['state'] = '1';
        }
        else
        {
            $data['state'] = '0';
        }
        $data['result'] = $pacs_jiancha_result;
        $data["msg"] = "";
        $data["error"] = 200;
        Utility::apiJsonResultExtends($data);
        // 是否进行数据压缩
        // $compression_http_data = $_REQUEST["compression_http_data"];
        //Utility::apiJsonResult($data,"",$compression_http_data);
    }
}